<!--
 * @Author: daidai
 * @Date: 2022-03-01 09:16:22
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-09-29 15:12:34
 * @FilePath: \web-pc\src\pages\big-screen\components\item-wrap\item-wrap.vue
-->
<template>
  <!-- 、`t${size}${titleNo}` -->
  <div class="lr_titles" :class="[type]">
    <div class="item_title" v-if="title !== ''">
      <div class="you"></div>
      <div class="title-inner">
        {{ title }}
      </div>
      
    </div>
    <div
      :class="title !== '' ? 'item_title_content' : 'item_title_content_def'"
    >
      <slot></slot>
    </div>
  </div>
</template>

<script>
import { title } from '@/config/EChartVar';

export default {
  data() {
    return {};
  },
  props: {
    title: {
      type: String,
      default: () => '',
    },
    size: { type: String, default: () => '' },
    type: {
      type: String,
      default: 'leftboxbg1',
    },
  },
  created() {},
  computed: {
    titleNo() {
      if (!this.title.length) return 2;
      else if (this.title.length <= 2) return 2;
      else if (this.title.length > 9) return 9;
      else return this.title.length;
    },
  },

  mounted() {},
  methods: {},
};
</script>
<style lang="scss" scoped>
$item-title-height: 38px;
$item_title_content-height: calc(100% - 38px);

.lr_titles {
  box-sizing: border-box;
  margin: 0 10px;
  pointer-events: auto;
  background: url('../../assets/img/launch/car/box5.png') no-repeat center;
  background-size: 100% 100%;

  :deep(.border-box-content) {
    box-sizing: border-box;
    padding: 6px 16px 0px;
  }

  .item_title {
    height: 22px;
    line-height: 18px;
    width: calc(100% - 22px);
    color: #31abe3;
    text-align: center;
    position: relative;
    display: flex;
    // flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 15px;
    margin-left: 21px;
    margin-bottom: 5px;
    .you{
      width: 3px;
      height: 16px;
      background-color: #2369EA;
      margin-right: 10px;
    }
    .title-inner {
      // font-family: PingFangSC, PingFang SC;
      // font-weight: 500;
      font-size: 16px;
      color: #FFFFFF;
      line-height: 18px;
      text-align: left;
      font-style: normal;
      
    }
  }

  .item_title_content {
    height: $item_title_content-height;
  }

  .item_title_content_def {
    width: 100%;
    height: 100%;
  }
}
.centerbg0{
  background-image: url('../../assets/img/launch/car/box5.png');
}
.leftboxbg1{
  background-image: url('../../assets/img/launch/avator/Boxbg-leftleft.png');
}
.leftrightBg3{
  background-image: url('../../assets/img/launch/avator/Boxbg-leftright.png');
}
.leftboxbg2{
  background-image: url('../../assets/img/launch/car/leftbox2.png');
}
.leftboxbg3{
  background-image: url('../../assets/img/launch/car/leftbox3.png');
}
.rightboxbg1{
  background-image: url('../../assets/img/launch/car/rightbox1.png');
}
.rightboxbg2{
  background-image: url('../../assets/img/launch/car/rightbox2.png');
}
.rightboxbg3{
  background-image: url('../../assets/img/launch/car/rightbox3.png');
}
.boxTC {
  background-image: url('../../assets/img/launch/car/boxTC.png');
}

</style>
